package com.dxysun.design.flyweight;

public class ConcreteFlyweight implements IFlyweight
{

	// 内部不可变信息
	private String info;

	// 可变信息
	private String other;

	public ConcreteFlyweight(String info)
	{
		this.info = info;
	}

	@Override
	public void operation(String str)
	{
		this.other = "Flyweight " + str;
		System.out.println("set other");
	}

	@Override
	public void showInfo(String str)
	{
		System.out.println(other + " " + info + " " + str);
	}
}
